import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
//引入signin模块
import Signin from '@/components/SignIn/SignIn'
const Home = () => import(/* webpackChunkName: "Home" */ '@/components/Home/Home')
const PermissionManage = () => import(/* webpackChunkName: "PermissionManage" */ '@/components/Home/System/PermissionManage')
const role = () => import(/* webpackChunkName: "role" */ '@/components/Home/System/role')
const user = () => import(/* webpackChunkName: "user" */ '@/components/Home/System/user')
const caipiao = () => import(/* webpackChunkName: "caipiao" */ '@/components/Home/Games/caipiao')
const ssq = () => import(/* webpackChunkName: "ssq" */ '@/components/Home/Games/ssq')


export default new Router({
  routes: [
    {
      path: '/',
      redirect: {name: 'Home'}
    },
    {
      path: '/Home',
      component: Home,
      name: 'Home',
      children: [
        ///Home/PermissionManage
        {path: 'PermissionManage',name:'权限管理',component:PermissionManage},
        {path: 'role',name:'角色管理',component:role},
        {path: 'user',name:'用户管理',component:user},
        {
          path: 'caipiao',
          name:'彩票列表',
          component:caipiao,
          children:[
            {path:'ssq',name:'双色球',component:ssq}
          ]
        },
      ]
    },
    {
       path: '/Signin',
       name: 'Signin',
       component: Signin
     }
  ]
})
